home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / 335_03.zip / ASZ8.TXT < prev    next >
Text File  |  1993-04-01  |  14KB  |  529 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.        A.  Appendix_for_asz8_Frankenstein_Assembler
  9.  
  10.        A.1  Pseudo_Operations
  11.  
  12.        A.1.1  Standard_Pseudo_Operation_Mnemonics
  13.  
  14.             End                                END
  15.             File Inclusion                     INCL INCLUDE
  16.             If                                 IF
  17.             Else                               ELSE
  18.             End If                             ENDI
  19.             Equate                             EQU
  20.             Set                                SET
  21.             Org                                ORG
  22.             Reserve Memory                     RESERVE RMB
  23.             Define Byte Data                   BYTE DB FCB
  24.             Define Word Data                   DW FDB WORD
  25.             Define String Data                 FCC STRING
  26.             Define Character Set Translation   CHARSET
  27.             Define Character Value             CHARDEF CHD
  28.             Use Character Translation          CHARUSE
  29.  
  30.        A.1.2  Machine_Dependent_Pseudo_Operations
  31.  
  32.        A.1.2.1  Register_Symbol_Definitions
  33.  
  34.             Label REG RegisterSymbol
  35.             Label RREG RegisterSymbol
  36.             Label REG expression
  37.             Label RREG expression
  38.             Label REG
  39.             Label RREG
  40.  
  41.        Symbols in the register address space are defined with the
  42.        REG, and RREG pseudooperations.  The symbol in the label
  43.        field is added to the symbol table as a register symbol.
  44.        The symbols defined with the REG are single byte registers.
  45.        The symbols defined with RREG are double registers, and must
  46.        be on even boundries.
  47.  
  48.        The operand can be in three forms.
  49.  
  50.        When the operand is a register symbol, the label symbol is
  51.        defined with the same register address as the symbol, with
  52.        the size determined by which pseudoop is used.  Aliases to
  53.        working registers must use this form.
  54.  
  55.        When the operand is an expression, the label symbol is
  56.        defined at the value of the expression, with the size
  57.        determined by which pseudoop is used.  The value must be in
  58.        the range 0 to 127 (or 223 for the UPC register set), or 240
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.  
  72.  
  73.  
  74.        to 255, and must be defined at the first pass.
  75.  
  76.        With no operand, the label symbol is defined at the register
  77.        address following the previous REG or RREG instruction.  If
  78.        a previous Register Definition used a working register as
  79.        its operand, the current definition will be in the working
  80.        set, otherwise it will be in the register file.
  81.  
  82.        Register Symbols must be surrounded by parenthesis when used
  83.        in expressions.
  84.  
  85.        A.1.2.2  Register_Set_Selection
  86.  
  87.             CPU string
  88.  
  89.        The register set can be specified in the source file with
  90.        the CPU pseudooperation.  The string, delimited by quotes or
  91.        apostrophes, is scanned for a substring which selects which
  92.        register set is used.  When the program is invoked, this
  93.        operation is performed on the name of the program, then the
  94.        -p optional arguement, if any, and then any CPU statements.
  95.        The last one selects the which subset of the registers the
  96.        assembler will accept.
  97.  
  98.             Register Architecture    Substrings
  99.  
  100.             z8                       86 z8 Z8
  101.  
  102.             Universal                UPC upc 9
  103.             Peripheral
  104.             Controller
  105.  
  106.        A.2  Instructions
  107.  
  108.        A.2.1  Instruction_List
  109.  
  110.        Opcode   Syntax                                 Selection Criteria
  111.  
  112.  
  113.        ADC       '@' REGISTER ',' '#' expr
  114.        ADC       REGISTER ',' '#' expr
  115.        ADC       REGISTER ',' '@' REGISTER
  116.        ADC       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  117.        ADC       REGISTER ',' REGISTER
  118.        ADC       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  119.  
  120.        ADD       '@' REGISTER ',' '#' expr
  121.        ADD       REGISTER ',' '#' expr
  122.        ADD       REGISTER ',' '@' REGISTER
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   - 3 -
  137.  
  138.  
  139.  
  140.        Opcode   Syntax                                 Selection Criteria
  141.  
  142.        ADD       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  143.        ADD       REGISTER ',' REGISTER
  144.        ADD       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  145.  
  146.        AND       '@' REGISTER ',' '#' expr
  147.        AND       REGISTER ',' '#' expr
  148.        AND       REGISTER ',' '@' REGISTER
  149.        AND       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  150.        AND       REGISTER ',' REGISTER
  151.        AND       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  152.  
  153.        CALL      '@' REGISTER                          DSTDBL
  154.        CALL      expr
  155.  
  156.        CCF
  157.  
  158.        CLR       '@' REGISTER
  159.        CLR       REGISTER
  160.  
  161.        COM       '@' REGISTER
  162.        COM       REGISTER
  163.  
  164.        CP        '@' REGISTER ',' '#' expr
  165.        CP        REGISTER ',' '#' expr
  166.        CP        REGISTER ',' '@' REGISTER
  167.        CP        REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  168.        CP        REGISTER ',' REGISTER
  169.        CP        REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  170.  
  171.        DA        '@' REGISTER
  172.        DA        REGISTER
  173.  
  174.        DEC       '@' REGISTER
  175.        DEC       REGISTER
  176.  
  177.        DECW      '@' REGISTER
  178.        DECW      REGISTER                              DSTDBL
  179.  
  180.        DI
  181.  
  182.        DJNZ      REGISTER ',' expr                     DSTWORK
  183.  
  184.        EI
  185.  
  186.        INC       '@' REGISTER
  187.        INC       REGISTER
  188.        INC       REGISTER                              DSTWORK
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                   - 4 -
  203.  
  204.  
  205.  
  206.        Opcode   Syntax                                 Selection Criteria
  207.  
  208.  
  209.        INCW      '@' REGISTER
  210.        INCW      REGISTER                              DSTDBL
  211.  
  212.        IRET
  213.  
  214.        JP        '@' REGISTER                          DSTDBL
  215.        JP        CONDITION ',' expr
  216.        JP        expr
  217.  
  218.        JR        CONDITION ',' expr
  219.        JR        expr
  220.  
  221.        LD        '@' REGISTER ',' '#' expr
  222.        LD        '@' REGISTER ',' REGISTER
  223.        LD        '@' REGISTER ',' REGISTER             DSTWORK+SRCWORK
  224.        LD        REGISTER ',' '#' expr
  225.        LD        REGISTER ',' '#' expr                 DSTWORK
  226.        LD        REGISTER ',' '@' REGISTER
  227.        LD        REGISTER ',' '@' REGISTER             DSTWORK+SRCWORK
  228.        LD        REGISTER ',' REGISTER
  229.        LD        REGISTER ',' REGISTER                 DSTWORK
  230.        LD        REGISTER ',' REGISTER                 SRCWORK
  231.        LD        REGISTER ',' expr '(' REGISTER ')'    DSTWORK+SRCWORK
  232.        LD        expr '(' REGISTER ')' ',' REGISTER    DSTWORK+SRCWORK
  233.  
  234.        LDC       '@' REGISTER ',' REGISTER             DSTWORK+SRCWORK
  235.        LDC       REGISTER ',' '@' REGISTER             DSTWORK+SRCWORK
  236.  
  237.        LDCI      '@' REGISTER ',' '@' REGISTER         DSTDBL+DSTWORK+SRCWORK
  238.        LDCI      '@' REGISTER ',' '@' REGISTER         SRCDBL+DSTWORK+SRCWORK
  239.  
  240.        LDE       '@' REGISTER ',' REGISTER             DSTWORK+SRCWORK
  241.        LDE       REGISTER ',' '@' REGISTER             DSTWORK+SRCWORK
  242.  
  243.        LDEI      '@' REGISTER ',' '@' REGISTER         DSTDBL+DSTWORK+SRCWORK
  244.        LDEI      '@' REGISTER ',' '@' REGISTER         SRCDBL+DSTWORK+SRCWORK
  245.  
  246.        NOP
  247.  
  248.        OR        '@' REGISTER ',' '#' expr
  249.        OR        REGISTER ',' '#' expr
  250.        OR        REGISTER ',' '@' REGISTER
  251.        OR        REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  252.        OR        REGISTER ',' REGISTER
  253.        OR        REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                   - 5 -
  269.  
  270.  
  271.  
  272.        Opcode   Syntax                                 Selection Criteria
  273.  
  274.        POP       '@' REGISTER
  275.        POP       REGISTER
  276.  
  277.        PUSH      '@' REGISTER
  278.        PUSH      REGISTER
  279.  
  280.        RCF
  281.  
  282.        RET
  283.  
  284.        RL        '@' REGISTER
  285.        RL        REGISTER
  286.  
  287.        RLC       '@' REGISTER
  288.        RLC       REGISTER
  289.  
  290.        RR        '@' REGISTER
  291.        RR        REGISTER
  292.  
  293.        RRC       '@' REGISTER
  294.        RRC       REGISTER
  295.  
  296.        SBC       '@' REGISTER ',' '#' expr
  297.        SBC       REGISTER ',' '#' expr
  298.        SBC       REGISTER ',' '@' REGISTER
  299.        SBC       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  300.        SBC       REGISTER ',' REGISTER
  301.        SBC       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  302.  
  303.        SCF
  304.  
  305.        SRA       '@' REGISTER
  306.        SRA       REGISTER
  307.  
  308.        SRP       '#' expr
  309.  
  310.        SUB       '@' REGISTER ',' '#' expr
  311.        SUB       REGISTER ',' '#' expr
  312.        SUB       REGISTER ',' '@' REGISTER
  313.        SUB       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  314.        SUB       REGISTER ',' REGISTER
  315.        SUB       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  316.  
  317.        SWAP      '@' REGISTER
  318.        SWAP      REGISTER
  319.  
  320.        TCM       '@' REGISTER ',' '#' expr
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                   - 6 -
  335.  
  336.  
  337.  
  338.        Opcode   Syntax                                 Selection Criteria
  339.  
  340.        TCM       REGISTER ',' '#' expr
  341.        TCM       REGISTER ',' '@' REGISTER
  342.        TCM       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  343.        TCM       REGISTER ',' REGISTER
  344.        TCM       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  345.  
  346.        TM        '@' REGISTER ',' '#' expr
  347.        TM        REGISTER ',' '#' expr
  348.        TM        REGISTER ',' '@' REGISTER
  349.        TM        REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  350.        TM        REGISTER ',' REGISTER
  351.        TM        REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  352.  
  353.        XOR       '@' REGISTER ',' '#' expr
  354.        XOR       REGISTER ',' '#' expr
  355.        XOR       REGISTER ',' '@' REGISTER
  356.        XOR       REGISTER ',' '@' REGISTER             SRCWORK+DSTWORK
  357.        XOR       REGISTER ',' REGISTER
  358.        XOR       REGISTER ',' REGISTER                 SRCWORK+DSTWORK
  359.  
  360.        A.2.2  Selection_Criteria_Keywords
  361.  
  362.             DSTWORK             The instruction will use the short
  363.                                 form if the register is in the
  364.                                 working set.
  365.  
  366.             DSTDBL              The instruction requires that the
  367.                                 destination register be a double
  368.                                 register.
  369.  
  370.             SRCWORK             The instruction will use the short
  371.                                 form if the register is in the
  372.                                 working set.
  373.  
  374.             SRCDBL              The instruction requires that the
  375.                                 source register be a double
  376.                                 register.
  377.  
  378.        A.2.3  Apostrophes  The apostrophes in the syntax field are
  379.        a notation used for the parser generator and are not put in
  380.        the assembler source statement.
  381.  
  382.        A.3  Notes
  383.  
  384.        A.3.1  Registers  Registers are treated as symbols with a
  385.        different syntactic type than memory addresses. This
  386.        seperates symbols which would have the same numeric value
  387.        into the different address spaces, register and memory.
  388.        Using a symbol that is already defined as a Register as a
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                                   - 7 -
  401.  
  402.  
  403.  
  404.        statement label for an instruction or a SET/EQU will result
  405.        in a "Syntax Error".
  406.  
  407.        Registers are represented by the reserved symbols R0 thru
  408.        R15 and RR0 thru RR14 for the working set registers. Other
  409.        registers are defined with the REG and RREG
  410.        pseudooperations.
  411.  
  412.        Register Symbols must be surrounded by parenthesis when used
  413.        in expressions.  Converted register values are meaningless
  414.        as ROM or Data memory addresses.  Working set registers have
  415.        a value between 0e0h and 0efh.
  416.  
  417.             Example
  418.  
  419.             ld r3, #(buffstart)
  420.  
  421.        A.3.2  Data_Memory  ROM and Data memory addresses are not
  422.        differentiated.
  423.  
  424.        A.3.3  Conditions  Conditions are represented by the
  425.        reserved symbols F, C, NC, Z, NZ, PL, MI, OV, NOV, EQ, NE,
  426.        GE, LT, GT, LE, UGE, ULT, UGT, ULE
  427.  
  428.        Note that the EQ, NE, GT, LE, GE, LT operators are not
  429.        available in this assembler, the =, <>, >, <=, >=, < special
  430.        character representations must be used.
  431.  
  432.        A.3.4  Reserved_Symbols
  433.  
  434.        A.3.4.1  Machine_Dependent_Reserved_Symbols  AND C DEFINED
  435.        EQ F GE GT HIGH LE LOW LT MI MOD NC NE NOT NOV NZ OR OV PL
  436.        R0 R1 R10 R11 R12 R13 R14 R15 R2 R3 R4 R5 R6 R7 R8 R9 RR0
  437.        RR10 RR12 RR14 RR2 RR4 RR6 RR8 SHL SHR UGE UGT ULE ULT XOR Z
  438.        and defined high low mod not or shl shr xor
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.                                  CONTENTS
  471.  
  472.  
  473.        A.  Appendix for asz8 Frankenstein Assembler.............  1
  474.            A.1  Pseudo Operations...............................  1
  475.            A.2  Instructions....................................  2
  476.            A.3  Notes...........................................  6
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                                   - i -
  525.  
  526.  
  527.  
  528.  
  529.